<html>
<head><meta charset="utf-8"><title>issue-51821 · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html">issue-51821</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="128724458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128724458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128724458">(Jun 27 2018 at 16:22)</a>:</h4>
<p>Reposting to start a new topic.<br>
So while that runs I see 2 questions, that I may be able to answer for myself with a working editor, but you may just know:<br>
1, how does the vec constraints end up calling add_region?<br>
2, is ConstraintIndex use anywhere? The places IndexVec are added to from 51821 don't record it.</p>



<a name="128725271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128725271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128725271">(Jun 27 2018 at 16:38)</a>:</h4>
<p>The answer to both is <code>compute_region_values</code> and <code>ConstraintIndex</code> is also used in <code>build_dependency_map</code></p>



<a name="128726047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726047">(Jun 27 2018 at 16:54)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> I'm back now, what's current status?</p>



<a name="128726066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726066">(Jun 27 2018 at 16:55)</a>:</h4>
<p>just drafting a question for you...</p>



<a name="128726227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726227">(Jun 27 2018 at 16:58)</a>:</h4>
<p>I see two ways to read your instructions,<br>
a: use a <code>FxHashSet&lt;(RegionVid, RegionVid)&gt;</code> to make <code>add_region</code> approximately NOP on repeated inputs.<br>
b: use a <code>FxHashSet&lt;(RegionVid, RegionVid)&gt;</code>to not add duplicate items to <code>constraints</code> in the first place.<br>
witch did you have in mind?</p>



<a name="128726445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726445">(Jun 27 2018 at 17:03)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> I did not mean modifying anything at the level of <code>add_region</code></p>



<a name="128726448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726448">(Jun 27 2018 at 17:03)</a>:</h4>
<p>I am not entirely sure where I <em>do</em> think we should modify</p>



<a name="128726458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726458">(Jun 27 2018 at 17:03)</a>:</h4>
<p>but i'd probably start by just not adding duplicate items to <code>constraints</code></p>



<a name="128726512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726512">(Jun 27 2018 at 17:04)</a>:</h4>
<p>the only potential issue I can see is that we may want to have extra information for error reporting -- i.e., the duplciate constraints arise for different reasons, and maybe some make sense more than others -- but we can cross that bridge when we come to it</p>



<a name="128726518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726518">(Jun 27 2018 at 17:04)</a>:</h4>
<p>in particular we're nowhere near smart enough to make use of that anyway :)</p>



<a name="128726644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726644">(Jun 27 2018 at 17:07)</a>:</h4>
<p>Ok, that prompts the question. Is <code>vec</code> the correct data structure for a set of things without duplicates.</p>



<a name="128726696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726696">(Jun 27 2018 at 17:08)</a>:</h4>
<p>yes, it does. There are some advantages. For example, we currently thread a linked list through the vector</p>



<a name="128726697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726697">(Jun 27 2018 at 17:08)</a>:</h4>
<p>using the indices</p>



<a name="128726700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726700">(Jun 27 2018 at 17:08)</a>:</h4>
<p>so that when one thing is dirty</p>



<a name="128726702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726702">(Jun 27 2018 at 17:08)</a>:</h4>
<p>we can quickly find the "dependent" constraints</p>



<a name="128726706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726706">(Jun 27 2018 at 17:08)</a>:</h4>
<p>that said, we used to build up a hashmap for that same purpose</p>



<a name="128726711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726711">(Jun 27 2018 at 17:08)</a>:</h4>
<p>I removed it as an optimization — but it turned out I was misinterpreting the profiles and it didn't really gain much</p>



<a name="128726724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726724">(Jun 27 2018 at 17:09)</a>:</h4>
<p>still, there is another argument in favor of a vector, which is that there is add'l data in each constraint that is not part of the "key" we use for uniqueness</p>



<a name="128726736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726736">(Jun 27 2018 at 17:09)</a>:</h4>
<p>though you could represent that with a <code>FxHashMap&lt;Key, ExtraData&gt;</code></p>



<a name="128726746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726746">(Jun 27 2018 at 17:09)</a>:</h4>
<p>still, i'd probably try inserting the <code>FxHashSet</code> to start</p>



<a name="128726801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726801">(Jun 27 2018 at 17:10)</a>:</h4>
<p>actually what I would prefer to see I think is for us to isolate out the "set of constraints" into a data structure of its own (in its own submodule, ideally :)</p>



<a name="128726802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726802">(Jun 27 2018 at 17:10)</a>:</h4>
<p>and then we can tinker...</p>



<a name="128726807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726807">(Jun 27 2018 at 17:10)</a>:</h4>
<p>e.g., that same file could encapsulate the logic of threading dirty constraints around...</p>



<a name="128726813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726813">(Jun 27 2018 at 17:10)</a>:</h4>
<p>but regardless of whether we encapsulate or not</p>



<a name="128726817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726817">(Jun 27 2018 at 17:10)</a>:</h4>
<p>it seems good to start with the simple thing (a set + the vec we have) and then we can measure the delta</p>



<a name="128726818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726818">(Jun 27 2018 at 17:10)</a>:</h4>
<p>of alternative choices</p>



<a name="128726855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726855">(Jun 27 2018 at 17:12)</a>:</h4>
<p>Ok, I will start with something small.</p>



<a name="128726903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128726903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128726903">(Jun 27 2018 at 17:13)</a>:</h4>
<blockquote>
<p>still, there is another argument in favor of a vector, which is that there is add'l data in each constraint that is not part of the "key" we use for uniqueness</p>
</blockquote>
<p>That data will also be lost if we remove duplicates from the vec.</p>



<a name="128727177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128727177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128727177">(Jun 27 2018 at 17:18)</a>:</h4>
<p>sure, but not for the entry we keep</p>



<a name="128727186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128727186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128727186">(Jun 27 2018 at 17:19)</a>:</h4>
<p>this is what I was saying before about "the only potential issue I can see is that we may want to have extra information for error reporting..."</p>



<a name="128730189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730189">(Jun 27 2018 at 18:21)</a>:</h4>
<p>Ok so I have a draft with a new field of <code>RegionInferenceContext</code> <code>seen_constraints: FxHashSet&lt;(RegionVid, RegionVid)&gt;,</code><br>
but it allocates a new vector in <code>new</code></p>



<a name="128730255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730255">(Jun 27 2018 at 18:22)</a>:</h4>
<p><code>Vec::new</code> has no heap allocation, so that may be ok?</p>



<a name="128730278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730278">(Jun 27 2018 at 18:23)</a>:</h4>
<p>well presumably it populates it too</p>



<a name="128730319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730319">(Jun 27 2018 at 18:24)</a>:</h4>
<p>ah that does not save us this time, we are copying a bunch into it.</p>



<a name="128730322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730322">(Jun 27 2018 at 18:24)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> right, so this is why I was talking about extracting out to a new data structure for a "Set of constraints"</p>



<a name="128730327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730327">(Jun 27 2018 at 18:24)</a>:</h4>
<p>so that we can create it before type check begins</p>



<a name="128730329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730329">(Jun 27 2018 at 18:24)</a>:</h4>
<p>and then move it into the region inference context</p>



<a name="128730336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730336">(Jun 27 2018 at 18:24)</a>:</h4>
<p>along with the hashset</p>



<a name="128730386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730386">(Jun 27 2018 at 18:24)</a>:</h4>
<p>that all makes sense. as a gole.</p>



<a name="128730387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730387">(Jun 27 2018 at 18:24)</a>:</h4>
<p>yep, doesn't have to be step 1</p>



<a name="128730421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730421">(Jun 27 2018 at 18:25)</a>:</h4>
<p>so I'd say I am at step 0.7. witch is preity good for the time i've put in.</p>



<a name="128730493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730493">(Jun 27 2018 at 18:26)</a>:</h4>
<p>it may already show some measurable effect...</p>



<a name="128730504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730504">(Jun 27 2018 at 18:27)</a>:</h4>
<p>but it seems like if we're micro-optimziing, it'd be better to avoid adding the duplicates from the beginning</p>



<a name="128730508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730508">(Jun 27 2018 at 18:27)</a>:</h4>
<p>versus adding them and then filtering them ou</p>



<a name="128730628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730628">(Jun 27 2018 at 18:29)</a>:</h4>
<p>I think the next step is to remove the allocation by using <a href="https://doc.rust-lang.org/std/vec/struct.Vec.html#method.retain" target="_blank" title="https://doc.rust-lang.org/std/vec/struct.Vec.html#method.retain">retain</a></p>



<a name="128730638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730638">(Jun 27 2018 at 18:29)</a>:</h4>
<p>ah, that's a decent compromise</p>



<a name="128730641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128730641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128730641">(Jun 27 2018 at 18:29)</a>:</h4>
<p>forgot about <code>retain</code></p>



<a name="128731885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128731885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128731885">(Jun 27 2018 at 18:52)</a>:</h4>
<p>used <code>retain</code> and it is pretty clean.</p>



<a name="128731918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128731918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128731918">(Jun 27 2018 at 18:53)</a>:</h4>
<p>next to look into were <code>new</code> is called as you suggested in the issue.</p>



<a name="128732101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128732101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128732101">(Jun 27 2018 at 18:57)</a>:</h4>
<p>nice</p>



<a name="128732730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128732730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128732730">(Jun 27 2018 at 19:10)</a>:</h4>
<p>looks like there is a long chain but it comes from <code>MirTypeckRegionConstraints</code></p>



<a name="128732819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128732819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128732819">(Jun 27 2018 at 19:12)</a>:</h4>
<p>yes that sounds right</p>



<a name="128733635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128733635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128733635">(Jun 27 2018 at 19:31)</a>:</h4>
<p>Where do you want the new type? What do you want it to be called?</p>



<a name="128733771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128733771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128733771">(Jun 27 2018 at 19:35)</a>:</h4>
<p>I think it belongs in a new module; I'd probably call it <code>rustc_mir::borrow_check::nll::region_infer::constraint_set::ConstraintSet</code> (with that module being <code>crate</code> visible)</p>



<a name="128733776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128733776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128733776">(Jun 27 2018 at 19:35)</a>:</h4>
<p>but it could also be <code>nll::constraint_set::ConstraintSet</code></p>



<a name="128733778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128733778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128733778">(Jun 27 2018 at 19:35)</a>:</h4>
<p>I've been debating about what should belong "under" <code>region_infer</code>...</p>



<a name="128733785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128733785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128733785">(Jun 27 2018 at 19:35)</a>:</h4>
<p>either way, the <code>Constraint</code> struct should probably live with it</p>



<a name="128733822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128733822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128733822">(Jun 27 2018 at 19:36)</a>:</h4>
<p>along with (I think) the logic for threading constraints into a linked list (eventually, anyway)</p>



<a name="128733939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128733939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128733939">(Jun 27 2018 at 19:38)</a>:</h4>
<p>So I was thinking change <code>MirTypeckRegionConstraints</code>to hold the new type. and it is in <code>type_checke</code></p>



<a name="128733950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128733950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128733950">(Jun 27 2018 at 19:38)</a>:</h4>
<p>so that suggests in nll.</p>



<a name="128734309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128734309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128734309">(Jun 27 2018 at 19:47)</a>:</h4>
<p>...so many nested modules...</p>



<a name="128737548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128737548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128737548">(Jun 27 2018 at 20:50)</a>:</h4>
<p>pr incoming</p>



<a name="128737682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128737682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128737682">(Jun 27 2018 at 20:53)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/51855" target="_blank" title="https://github.com/rust-lang/rust/pull/51855">https://github.com/rust-lang/rust/pull/51855</a></p>



<a name="128738813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128738813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128738813">(Jun 27 2018 at 21:14)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> I left some notes on the PR</p>



<a name="128739161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739161">(Jun 27 2018 at 21:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I assume by <code>Constraint</code> you mean <code>OutlivesConstraint</code>or are you asking me to rename it?</p>



<a name="128739341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739341">(Jun 27 2018 at 21:24)</a>:</h4>
<p>I think you want me to bring <code>build_dependency_map</code> into the new type as <code>link</code> so as to get rid of <code>inner_mut</code>?</p>



<a name="128739367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739367">(Jun 27 2018 at 21:25)</a>:</h4>
<p>and I don't know what you want me to bring in for <code>each_affected_by_dirty</code></p>



<a name="128739434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739434">(Jun 27 2018 at 21:26)</a>:</h4>
<blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I assume by <code>Constraint</code> you mean <code>OutlivesConstraint</code>or are you asking me to rename it?</p>
</blockquote>
<p>yes I mean that, I am not saying we should rename it</p>



<a name="128739436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739436">(Jun 27 2018 at 21:26)</a>:</h4>
<blockquote>
<p>I think you want me to bring <code>build_dependency_map</code> into the new type as <code>link</code> so as to get rid of <code>inner_mut</code>?</p>
</blockquote>
<p>yes</p>



<a name="128739450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739450">(Jun 27 2018 at 21:26)</a>:</h4>
<blockquote>
<p>and I don't know what you want me to bring in for <code>each_affected_by_dirty</code></p>
</blockquote>
<p>I basically don't want to have direct access to the vector</p>



<a name="128739459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739459">(Jun 27 2018 at 21:26)</a>:</h4>
<p>so I was proposing that we extract the loop that uses it into a method</p>



<a name="128739460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739460">(Jun 27 2018 at 21:26)</a>:</h4>
<p>one second...</p>



<a name="128739486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739486">(Jun 27 2018 at 21:27)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> <a href="https://github.com/rust-lang/rust/blob/4aff10bb1b9b202bb6464f99d198d3e6f49e6991/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L504-L510" target="_blank" title="https://github.com/rust-lang/rust/blob/4aff10bb1b9b202bb6464f99d198d3e6f49e6991/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L504-L510">this is the loop I would exract into that method</a></p>



<a name="128739549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739549">(Jun 27 2018 at 21:28)</a>:</h4>
<p>it would be replaced with something like:</p>
<div class="codehilite"><pre><span></span><span class="n">constraint_set</span><span class="p">.</span><span class="n">each_affected_by_dirty</span><span class="p">(</span><span class="n">constraint</span><span class="p">.</span><span class="n">sup</span><span class="p">,</span><span class="w"> </span><span class="o">|</span><span class="n">dep_idx</span><span class="o">|</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="n">dirty_list</span><span class="p">.</span><span class="n">push</span><span class="p">(</span><span class="n">dep_idx</span><span class="p">);</span><span class="w"></span>
<span class="p">});</span><span class="w"></span>
</pre></div>



<a name="128739551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739551">(Jun 27 2018 at 21:28)</a>:</h4>
<p>I guess we would still want to permit indexing by <code>ConstraintIndex</code></p>



<a name="128739866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739866">(Jun 27 2018 at 21:34)</a>:</h4>
<p>I don't groc that code at this time. Nor will I be able to do it in the time I have left today.<br>
So let me see if I can get <code>link</code> done tonight. <code>build_dependency_map</code> starts with <code>let mut map = IndexVec::from_elem(None, &amp;self.definitions);</code><br>
So should the <code>link</code> take a starting <code>map</code> as an argument?</p>



<a name="128739954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739954">(Jun 27 2018 at 21:36)</a>:</h4>
<p><code>link</code> would be a good start :)</p>



<a name="128739959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739959">(Jun 27 2018 at 21:36)</a>:</h4>
<p>it should probably return the <code>map</code></p>



<a name="128739962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739962">(Jun 27 2018 at 21:36)</a>:</h4>
<p>oh, it needs to know the number of items I guess?</p>



<a name="128739977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128739977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128739977">(Jun 27 2018 at 21:37)</a>:</h4>
<p>just pass in <code>self.definitions.len()</code> and invoke <code>IndexVec::from_elem_n(None, len)</code></p>



<a name="128740030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128740030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128740030">(Jun 27 2018 at 21:38)</a>:</h4>
<p>lol is that all its doing.</p>



<a name="128740125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128740125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128740125">(Jun 27 2018 at 21:40)</a>:</h4>
<p>yeah</p>



<a name="128740665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128740665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128740665">(Jun 27 2018 at 21:54)</a>:</h4>
<p>links is up</p>



<a name="128740982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128740982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128740982">(Jun 27 2018 at 22:02)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> I'll take a look -- do you think you'll have more time for the rest later? (I wasn't clear on whether you happened to have time today, or you would have time e.g. tomorrow etc)</p>



<a name="128740990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128740990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128740990">(Jun 27 2018 at 22:03)</a>:</h4>
<p>I could plausibly pull out some of that code the way I had in mind, seems like it wouldn't take that long, but if you think you'll have time, better for you to do it so you can get more familiar with things :)</p>



<a name="128741006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741006">(Jun 27 2018 at 22:03)</a>:</h4>
<p>I'm not sure either, but I am going to give it a little longer tonight.</p>



<a name="128741067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741067">(Jun 27 2018 at 22:04)</a>:</h4>
<p>ok looking at <code>each_affected_by_dirty</code> the code you linked refers to 2 other variables.<br>
- <code>clean_bit_vec</code> which is not straightforward to bring in do to <a href="https://github.com/rust-lang/rust/blob/4aff10bb1b9b202bb6464f99d198d3e6f49e6991/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L495" target="_blank" title="https://github.com/rust-lang/rust/blob/4aff10bb1b9b202bb6464f99d198d3e6f49e6991/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L495">https://github.com/rust-lang/rust/blob/4aff10bb1b9b202bb6464f99d198d3e6f49e6991/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L495</a><br>
- <code>dependency_map</code> witch is <a href="https://github.com/rust-lang/rust/blob/4aff10bb1b9b202bb6464f99d198d3e6f49e6991/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L485" target="_blank" title="https://github.com/rust-lang/rust/blob/4aff10bb1b9b202bb6464f99d198d3e6f49e6991/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L485">https://github.com/rust-lang/rust/blob/4aff10bb1b9b202bb6464f99d198d3e6f49e6991/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L485</a></p>
<p><code>dependency_map</code> can be removed by taking <code>Option&lt;ConstraintIndex&gt;</code> as an arg instead of <code>RegionVid</code><br>
don't know about the other.</p>



<a name="128741164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741164">(Jun 27 2018 at 22:07)</a>:</h4>
<p><code>clean_bit_vec</code> can be added as part of the call back.</p>



<a name="128741239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741239">(Jun 27 2018 at 22:09)</a>:</h4>
<p>the <code>dependency_map</code> would I guess have to be given back, after having been returned by <code>link</code></p>



<a name="128741243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741243">(Jun 27 2018 at 22:09)</a>:</h4>
<p>it could also be stored in the <code>ConstraintSet</code> structure itself I suppose</p>



<a name="128741330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741330">(Jun 27 2018 at 22:11)</a>:</h4>
<p>I have something for you do look at</p>



<a name="128741340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741340">(Jun 27 2018 at 22:11)</a>:</h4>
<p>one sec for the push to go thure</p>



<a name="128741394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741394">(Jun 27 2018 at 22:12)</a>:</h4>
<p>also can I remove new, it is giving ded code workings?</p>



<a name="128741397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741397">(Jun 27 2018 at 22:12)</a>:</h4>
<p>yep</p>



<a name="128741573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741573">(Jun 27 2018 at 22:16)</a>:</h4>
<p>pushed, getting an odd error</p>
<div class="codehilite"><pre><span></span>error[E0596]: cannot borrow immutable argument `op` as mutable
  --&gt; librustc_mir\borrow_check\nll\constraint_set.rs:63:13
   |
60 |         op: impl FnMut(ConstraintIndex),
   |         -- consider changing this to `mut op`
...
63 |             op(dep_idx);
   |             ^^ cannot borrow mutably

error: aborting due to previous error
</pre></div>



<a name="128741782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741782">(Jun 27 2018 at 22:22)</a>:</h4>
<p>What  borrow!</p>



<a name="128741866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741866">(Jun 27 2018 at 22:25)</a>:</h4>
<p><code>mut op</code> made the errore go away.</p>



<a name="128741868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741868">(Jun 27 2018 at 22:25)</a>:</h4>
<p>I think this is close to what you wanted.</p>



<a name="128741989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128741989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128741989">(Jun 27 2018 at 22:28)</a>:</h4>
<blockquote>
<p>What  borrow!</p>
</blockquote>
<p>the <code>call</code> is a borrow</p>



<a name="128742007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742007">(Jun 27 2018 at 22:29)</a>:</h4>
<p>that hiccup aside, I think that is a <code>each_affected_by_dirty</code> for you.</p>



<a name="128742287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742287">(Jun 27 2018 at 22:37)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> looks great! I left some nits, mostly requests for comment and one minor cleanup.</p>



<a name="128742292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742292">(Jun 27 2018 at 22:37)</a>:</h4>
<p>but yes I'd say that's more or less done</p>



<a name="128742450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742450">(Jun 27 2018 at 22:41)</a>:</h4>
<p>ok I am working on all the <code>iters</code> then I will do the <code>Index</code></p>



<a name="128742565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742565">(Jun 27 2018 at 22:44)</a>:</h4>
<p>(I also pointed out we could use a <code>Deref</code> impl instead)</p>



<a name="128742589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742589">(Jun 27 2018 at 22:45)</a>:</h4>
<p><code>Deref</code> but not <code>DerefMut</code> that sounds good.</p>



<a name="128742630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742630">(Jun 27 2018 at 22:46)</a>:</h4>
<p>right</p>



<a name="128742831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742831">(Jun 27 2018 at 22:51)</a>:</h4>
<p>done and pushed</p>



<a name="128742880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742880">(Jun 27 2018 at 22:52)</a>:</h4>
<p>looks great</p>



<a name="128742886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742886">(Jun 27 2018 at 22:52)</a>:</h4>
<p>are you able to add the comments?</p>



<a name="128742899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128742899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128742899">(Jun 27 2018 at 22:53)</a>:</h4>
<p>for got I will do it</p>



<a name="128743082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128743082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128743082">(Jun 27 2018 at 22:58)</a>:</h4>
<p>added</p>



<a name="128743092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128743092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128743092">(Jun 27 2018 at 22:59)</a>:</h4>
<p>very nice =)</p>



<a name="128743105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128743105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128743105">(Jun 27 2018 at 22:59)</a>:</h4>
<p>This has been a lot of work of ~ 30% of ~8% = ~2% improvement.</p>



<a name="128743167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128743167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128743167">(Jun 27 2018 at 23:00)</a>:</h4>
<p>code is nicer anyhow :)</p>



<a name="128743185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128743185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128743185">(Jun 27 2018 at 23:01)</a>:</h4>
<p>and in the long run 2 man-days is not a lot.</p>



<a name="128779366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128779366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128779366">(Jun 28 2018 at 16:03)</a>:</h4>
<p>rebase is done ~1h ago, waiting on travis and and r+</p>



<a name="128779524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128779524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128779524">(Jun 28 2018 at 16:07)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> remind me the URL?</p>



<a name="128779546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128779546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128779546">(Jun 28 2018 at 16:07)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/51855" target="_blank" title="https://github.com/rust-lang/rust/pull/51855">https://github.com/rust-lang/rust/pull/51855</a></p>



<a name="128781319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128781319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128781319">(Jun 28 2018 at 16:48)</a>:</h4>
<p>I was thinking, always dangerous, from the way you described things the field pub point: Location, is not important any more. Would it be a good cleanup to just remove it as a separate PR?</p>



<a name="128781943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128781943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128781943">(Jun 28 2018 at 16:53)</a>:</h4>
<p>I believe we use it during error reporting</p>



<a name="128782043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128782043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128782043">(Jun 28 2018 at 16:55)</a>:</h4>
<p>so I'd say leave it</p>



<a name="128782380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128782380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128782380">(Jun 28 2018 at 17:03)</a>:</h4>
<p>I would have thought we used <code> pub span: Span, </code> for error reporting?</p>



<a name="128782402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128782402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128782402">(Jun 28 2018 at 17:03)</a>:</h4>
<p>we use both</p>



<a name="128782407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128782407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128782407">(Jun 28 2018 at 17:03)</a>:</h4>
<p>I'm actually not sure if we us the span :)</p>



<a name="128782412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128782412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128782412">(Jun 28 2018 at 17:04)</a>:</h4>
<p>knowing the point lets us describe <em>why</em></p>



<a name="128782451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128782451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128782451">(Jun 28 2018 at 17:04)</a>:</h4>
<p>more intelligently than just <em>where</em></p>



<a name="128782458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128782458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128782458">(Jun 28 2018 at 17:04)</a>:</h4>
<p>i.e., we can inspect the MIR</p>



<a name="128782460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/issue-51821/near/128782460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/issue-51821.html#128782460">(Jun 28 2018 at 17:04)</a>:</h4>
<p>ok</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>